#delimit;
version 11;
set linesize 80;
set more off;

use "~/Dropbox/Documents/Papers/Race_for_Regs/Dataverse/Race_for_regs_LAWS.dta", clear;


keep if UA_discretion_granting==1;

/******************************************************************************/
/* Table 1 */
logit UA_deadline unifiedgovt cong, cluster(cong);
logit UA_deadline unifiedgovt cong i.major, cluster(cong) ; 
logit UA_deadline unifiedgovt norollcall cong i.major, cluster(cong) ;
logit UA_deadline unifiedgovt coalitionsize_avg cong i.major, cluster(cong);
logit UA_deadline unifiedgovt coalitionsize_avg mayhew cong i.major, cluster(cong);
/******************************************************************************/



preserve;
keep year unifiedgovt;
collapse unifiedgovt, by (year);
tset year;
gen unifiedgovt_lead =f.unifiedgovt;
drop if year==.;

tempfile temp;
save "`temp'";

restore;

merge m:1 year unifiedgovt using "`temp'";


/******************************************************************************/
/* Table 2 */
logit UA_deadline unifiedgovt##unifiedgovt_lead cong , cluster(cong);
logit UA_deadline unifiedgovt##unifiedgovt_lead cong i.major, cluster(cong)  ;
logit UA_deadline unifiedgovt##unifiedgovt_lead norollcall cong i.major, cluster(cong) ;
logit UA_deadline unifiedgovt##unifiedgovt_lead coalitionsize_avg cong i.major, cluster(cong);
logit UA_deadline unifiedgovt##unifiedgovt_lead coalitionsize_avg mayhew cong i.major, cluster(cong);
/******************************************************************************/



